﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using ConfiguationManagement.Properties;

namespace ConfiguationManagement
{
    public abstract class CfgManager
    {
        private static XmlDocument doc = new XmlDocument();
        static CfgManager()
        {
            doc.LoadXml(Resources.Configuration);
        }
        public static DataBase GetDataBase()
        {
            XmlNode node = doc.SelectSingleNode("//Comminucation/DataBase");
            string db = node.InnerText;
            return (DataBase)Enum.Parse(typeof(DataBase), db, true);
        }
    }

    public enum DataBase
    {
        XML,
        SqlServer,
        Oracle,
    }
}
